# -*- coding: utf-8 -*-
"""
@Time    : 2021/10/12 8:31
@Author  : Leibuyun
@File    : 1.17 从字典中提取子集.py
"""

# 方法1： 字典推导
prices = {
    'ACME': 45.23,
    'AAPL': 512.78,
    'IBM': 205.55,
    'HPQ': 37.2,
    'FB': 10.75
}

p1 = {key: value for key, value in prices.items() if value > 200}